var express = require('express');
var router = express.Router();
router.get('/',(req,res)=>{
	
	res.header("Access-Control-Allow-Origin", "*");
	res.header("Access-Control-Allow-Credentials","true");
	//setTimeout(()=>{
		res.json({errorCode:0,data:[{id:1,name:'a'},{id:2,name:'b'}]})
	//},1000)
})
router.post('/',(req,res)=>{
	
	res.header("Access-Control-Allow-Origin", "*");
	res.header("Access-Control-Allow-Credentials","true");
	//setTimeout(()=>{
		res.json({errorCode:0,data:[{id:1,name:'a'},{id:2,name:'b'}]})
	//},1000)
})
router.get('/show/:id',(req,res)=>{
	res.header("Access-Control-Allow-Origin", "*");
	
		res.json({errorCode:0,data:{id:req.params.id}})
	
	
})
module.exports=router;